home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / CHIPCD_02_2002.iso / Internet / Macromedia ColdFusion Server 5 / coldfusion-50-win-us.exe / data1.cab / Examples / CFDOCS / snippets / lsparsecurrency.cfm < prev    next >
Encoding:
Text File  |  2001-06-13  |  952 b   |  38 lines

  1. <!--- This shows LSParseCurrency --->
  2.  
  3. <HTML>
  4.  
  5. <HEAD>
  6. <TITLE>LSParseCurrency Example</TITLE>
  7. </HEAD>
  8.  
  9. <BASEFONT FACE="Arial, Helvetica" SIZE=2>
  10. <BODY  bgcolor="#FFFFD5">
  11.  
  12. <H3>LSParseCurrency Example</H3>
  13.  
  14. <P>LSParseCurrency coverts a local-specific currency
  15. string to a number.  Attempts conversion through each of
  16. the three default currency formats.
  17.  
  18. <!--- loop through a list of possible locales and
  19. show currency values for 123,456 units --->
  20. <CFLOOP LIST="#Server.Coldfusion.SupportedLocales#"
  21. INDEX="locale" DELIMITERS=",">
  22.     <CFSET oldlocale = SetLocale("#locale#")>
  23.  
  24.     <CFOUTPUT><P><B><I>#locale#</I></B><BR>
  25.         Local: #LSCurrencyFormat(123456, "local")#<BR>
  26.         Currency Number: #LSParseCurrency(LSCurrencyFormat(123456,"local"))#<BR>
  27.         International: #LSCurrencyFormat(123456, "international")#<BR>
  28.         None: #LSCurrencyFormat(123456, "none")#<BR>
  29.         <hr noshade>
  30.     </CFOUTPUT>
  31.  
  32. </CFLOOP>
  33.  
  34.  
  35.  
  36. </BODY>
  37. </HTML>       
  38.